package main

import "fmt"

type ia interface {
	sayA()
}
type ib interface {
	sayB()
}

// 接口继承ia、 ib， 和私有sayC
type ic interface {
	ia
	ib
	sayC()
}

type Ints int8 // 结构体实现了三个接口

func (i Ints) sayA() {
	fmt.Println("i am sayA", i)
}

func (i Ints) sayB() {
	fmt.Println("i am sayB", i)
}

func (i Ints) sayC() {
	fmt.Println("i am sayC", i)
}

func main() {
	var i ic = Ints(10)
	i.sayC()
	i.sayA()
	i.sayB()

}
